<template>
    <div>
        <div class="header">
            <img class="pic" :src="data.pic">
            <div class="name">{{data.title}}</div>
        </div>
    </div>
</template>

<script>
    export default {
        name:'TopDetail',
        data() {
            return {
                data:''
            }
        },
        mounted() {
            var {id} =this.$route.query
            this.$http.get('http://47.108.197.28:4000/api/movie/top250').then(res=>{
                var movies = res.data.res
                this.data = movies.find(item=>item._id==id)
            })
        }
    }
</script>

<style lang="scss" scoped>

</style>